#!/bin/bash

# This is the config file for click log

# Following parameters could be defined as environmental variables:
# STREAMING_PATH, VERSION, LOCAL_BASE, QUEUE_NAME, HIVE_BASE, USER_REC_HDFS_BASE, USER_REC_RUN_PATH

STREAMING_PATH=${STREAMING_PATH:-"/usr/lib/hadoop/contrib/streaming/hadoop-streaming-*.jar"}
VERSION=${VERSION:-"1.0"}
USER=`whoami`

HDFS_BASE=/data/QIYU/qitan_${VERSION}
HDFS_TEMP_PATH=$HDFS_BASE/temp
LOCAL_BASE=${LOCAL_BASE:-"/home/$USER/qitan"}
LOCAL_TEMP_PATH=$LOCAL_BASE/temp
QUEUE_NAME=${QUEUE_NAME:-"resys_day"}

HIVE_BASE=${HIVE_BASE:-"/user/hive/warehouse"}

# ------------------------------------------------------------------------------------------
# specific settings for click log pipelines
USER_REC_LOCAL_BASE=$QITAN_USER_REC_RUN_PATH
USER_REC_HDFS_BASE=${USER_REC_HDFS_BASE:-"$HDFS_BASE/user_rec"}
USER_REC_LOCAL_BASE=${USER_REC_LOCAL_BASE:-"$LOCAL_BASE/user_rec"}

USER_REC_LOCAL_DATA_PATH=${USER_REC_LOCAL_BASE}/data     # local data path
USER_REC_LOCAL_TEMP_PATH=${USER_REC_LOCAL_BASE}/temp     # local temp path
USER_REC_LOCAL_DONE_PATH=${USER_REC_LOCAL_BASE}/done     # local done path
USER_REC_LOCAL_PLOG_PATH=${USER_REC_LOCAL_BASE}/logs_pid # local pid log path
USER_REC_LOCAL_LOG_PATH=${USER_REC_LOCAL_BASE}/logs      # local pid log path

USER_REC_HDFS_DONE_PATH=${USER_REC_HDFS_BASE}/done      # hdfs done path
USER_REC_HDFS_DATA_PATH=${USER_REC_HDFS_BASE}/data      # hdfs data path

USER_REC_BIN_PATH=${USER_REC_LOCAL_BASE}/bin            # working path which including all running scripts/binaries

# status could be EXPERIMENT or PRODUCTION
USER_REC_RUN_STATUS=PRODUCTION

